// 发送消息请求接口
export interface SendMessageRequest {
    inputs: Record<string, any>
    query: string
    response_mode: 'streaming' | 'blocking'
    conversation_id?: string
    user: string
    files?: FileObject[]
    auto_generate_name?: boolean
}

// 流式响应数据接口
export interface StreamResponse {
    event: string
    type: string
    content: string
    conversation_id?: string
    message_id?: string
    created_at?: number
    task_id?: string
    workflow_run_id?: string
    answer?: string
}

// 发送消息响应接口
export interface SendMessageResponse {
    conversation_id: string
    message_id: string
    answer: string
    created_at: number
    task_id?: string
    workflow_run_id?: string
}

// 请求配置接口
export interface RequestConfig {
    url: string
    data: any
    header: {
        'Content-Type': string
    }
}
// 文件对象接口
export interface FileObject {
    type: 'image' | 'audio' | 'video' | 'document' | 'custom'
    transfer_method: 'remote_url' | 'local_file'
    url?: string
    upload_file_id?: string
}
// 定义消息类型接口
export interface Message {
    type: 'user' | 'ai'
    content: string
    time: string
    isStreaming?: boolean
  }
  